﻿#ifndef SOCKET_H
#define SOCKET_H
#include "overallsituation.h"

#include <QDialog>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonValue>
#include <QMessageBox>
#include <QDebug>
#include <string>
#include <QTcpSocket>
#include <QKeyEvent>
#include <QWidget>
#include <QMainWindow>
#include <QtNetwork>
#include <QTcpServer>
#include <QByteArray>
#include "thread.h"
class Socket: public QObject
{
    Q_OBJECT
public:
     ThreadPool *thread;
private:
    QTcpSocket *serversocket[10];
    QTcpServer* m_tcp;

public:
    Socket(unsigned short port);
    bool Send(int ParentID,int SubID,QJsonObject Data);
private:

    void ListenIn(unsigned short port);
signals:
    void Print(const QString& text);
};

#endif // SOCKET_H
